﻿namespace CN2P.ServiceModel
{
    using System.Collections.Generic;

    public static class EnumerableExt
    {
        public static ProductModelPagedList ToPagedProductModel(this IList<ProductModel> allItems, int pageNumber, int pageSize)
        {
            return new ProductModelPagedList(allItems, pageNumber, pageSize);
        }

        public static ProductReviewModelPagedList ToPagedProductReviewModel(this IList<ProductReviewModelResponse> allItems, int pageNumber, int pageSize)
        {
            return new ProductReviewModelPagedList(allItems, pageNumber, pageSize);
        }
    }
}
